package main

import (

	"fmt"
)

type Queue struct {

	Pre int
	Next int
	Data [5]int
	Len int
}
func (q *Queue)Push(val int)  {
	q.Len += 1
	q.Next += 1
	q.Data[q.Next] = val
}
func (q *Queue)Pop() int {
	q.Len -= 1
	q.Pre += 1
	val := q.Data[q.Pre]

	return val
}
func (q *Queue)Lenth() int {

	len := q.Len
	return len
}
func (q *Queue)PrintAll()  {
	Data := q.Data
	for i:=q.Pre+1 ;i<= q.Next;i++{
		fmt.Println(Data[i])
	}

}
func main()  {

	Queue := &Queue{Pre:-1,Next: -1,Len: 0}
	Queue.Push(12)
	Queue.Push(18)
	Queue.Push(20)
	Queue.Pop()
	Queue.Push(100)
	Queue.PrintAll()
}